home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Menus / High Level / ExtensibleMenuSection.h < prev    next >
Encoding:
Text File  |  1997-06-28  |  908 b   |  39 lines  |  [TEXT/CWIE]

  1. // ExtensibleMenuSection.h
  2.  
  3. #ifndef ExtensibleMenuSection_h
  4. #define ExtensibleMenuSection_h
  5.  
  6. #ifndef MenuSection_h
  7. #include "MenuSection.h"
  8. #endif
  9.  
  10. class ExtensibleMenuSection: public MenuSection
  11.   {
  12.     public:
  13.         ExtensibleMenuSection( Menu& );
  14.  
  15.         uint16 Length() const;
  16.         
  17.         MenuItem operator[]( uint16 index );
  18.         
  19.         void EnableTail( uint32 begin );
  20.         void DisableTail( uint32 begin );
  21.         
  22.         void EnableAll()                                    { EnableTail( 0 ); }
  23.         void DisableAll()                                    { DisableTail( 0 ); }
  24.                 
  25.         void InsertItem( uint16 index, ConstPString text );
  26.         void AppendItem( ConstPString text )        { menu.AppendItem( text ); }
  27.         
  28.         void InsertDivider( uint16 index );
  29.         void AppendDivider()                                { menu.AppendDivider(); }
  30.         
  31.         void InsertResources( uint16 index, ResType );
  32.         void AppendResources( ResType type )        { menu.AppendResources( type ); }
  33.         
  34.         void DeleteItem( uint16 index );
  35.         void DeleteAll();
  36.   };
  37.  
  38. #endif
  39.